package com.baselibrary.adapter;

import android.view.View;

/**
 * @ClassName: HuangHangTagAdapter
 * @Author: Carl
 * @Description: java类作用描述
 * @CreateDate: 2020-09-21 22:12
 * @UpdateUser: Carl
 * @UpdateDate: 2020-09-21 22:12
 * @UpdateRemark: 填写更新说明
 */
public abstract class LineBreakTagAdapter {

    public abstract int getCount();

    public abstract Object getItem(int position);

    public abstract long getItemId(int position);

    public abstract View getView(int position);

    public void notifyDataSetChanged(){
        if(null != mOnNotifyDataSetChangedListener){
            mOnNotifyDataSetChangedListener.OnNotifyDataSetChanged();
        }
    }

    /**
     *  释放一个接口 串联adapter与view中间的数据刷新
     */
    public interface OnNotifyDataSetChangedListener{
        void OnNotifyDataSetChanged();
    }
    private OnNotifyDataSetChangedListener mOnNotifyDataSetChangedListener;
    public void setOnNotifyDataSetChangedListener(OnNotifyDataSetChangedListener listener){
        mOnNotifyDataSetChangedListener = listener;
    }
}
